﻿using ConfExpert.Forms.Base;
using DevTeam;

using System;
namespace ConfExpert.Forms.SatinAlma
{
    public partial class _WBuprice : XForm
    {
        public _WBuprice()
        {
            InitializeComponent();
        }

        private void WBuprice_Load(object sender, EventArgs e)
        {
            gvGP.Init("GetWBGelisleri", 75, new DateTime(2013, 4, 17));
            gvGP.AddDetailGrid(gvProduct, "GelisPartisiId");
            gvProduct.AddDetailGrid(gvTop, "GelisPartisiLinesId");

            gvProduct.MakeColumnInvisible("GelisPartisiId", "GelisPartisiLinesId");
            gvTop.MakeColumnInvisible("GelisPartisiLinesId");

            gvProduct.AddColumn("Qty", typeof(decimal), "SUM(Child({FK}).Qty)");
            gvGP.AddColumn("Qty", typeof(decimal), "SUM(Child({FK}).Qty)");

            gvTop.AddSummary("Qty");
            gvProduct.AddSummary("Qty");
            gvGP.AddSummary("Qty");

            gvGP.BestFitColumns();
            gvProduct.BestFitColumns();
            gvTop.BestFitColumns();

            splitContainerControl2.AutoSize();
        }
    }
}